package com.xianniu.ltc.feign.api;

import com.xianniu.ltc.config.FeignConfiguration;
import com.xianniu.ltc.feign.hystrix.ApiServiceHystrix;
import com.xianniu.ltc.model.po.NotificationAddPO;
import com.xxl.sso.core.entity.ReturnT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author yk
 * @version 1.0
 * @description: api项目feign接口
 * @date 2021/8/31 10:50
 */
@FeignClient(value = "xianniu-api", fallback = ApiServiceHystrix.class, configuration = FeignConfiguration.class)
public interface ApiService {
    /**
     * 新增消息通知
     * @param po
     * @return
     */
    @PostMapping("/transport/add")
    ReturnT notificationAdd(@RequestBody NotificationAddPO po, @RequestHeader("xnToken") String token);

}
